As demand on computer system throughput continues to increase, consolidation and sharing of computing resources becomes more important. In particular, in many modern computer systems, numerous operating systems (OS's) may operate (“run”) within the same computer system simultaneously. In order to enable these OS's to run at acceptable performance levels on the same computing hardware (i.e. same microprocessor or microprocessors), system designers have resorted to a technique known as “virtualization” of computing resources.
Virtualization of computing resources refers to any number of techniques used to share computing hardware resources among a number of operating systems and/or software applications (collectively referred to as “guest” software). Virtualization techniques can broadly be categorized as employing a “dedicated policy”, in which computing hardware is partitioned and each partition is dedicated to particular guest software, or a “shared policy”, in which computing hardware is allocated to a number of guest software according to some arbitration scheme, such as a time-based allocation algorithm (e.g., “time multiplexing”). Throughout this disclosure, the terms “virtual” and “guest” may be used interchangeably to describe certain aspects of the guest software and interrupts intended to be serviced by the guest software.
Computer systems using shared policy virtualization of computing resources can be subject to performance degradation, as allocating appropriate processor resources to guest software in a timely manner can be difficult as the number of guest software, such as operating systems, increases. Interrupts to a processor in the computing system, in particular, can be difficult to service in a timely manner as the number of interrupt sources increases. One type of interrupt that can be difficult for a processor to service, especially as the number of guest software to service the interrupts increases, is an input/output (I/O) interrupt.
I/O interrupts originate from devices and sources external to a processor, including keyboard controllers, mouse activity, and wireless adapters. In a shared resource virtualization configuration, a guest software program must continually allocate resources to servicing various I/O interrupts according to some arbitration scheme. In at least one prior art virtualization technique, guest software services I/O interrupts according to a priority level assigned to each interrupt and relies on virtualization software routines (“host” software) to assign the appropriate priority to the interrupts and notify the guest software of the interrupts.
Guest software typically retrieves I/O interrupt information from the host software by issuing commands, such as a “read” command, to control logic responsible for controlling processor resources, such as I/O. Furthermore, guest software typically adjusts the priority of various interrupts by issuing commands, such as a “write” command, to the processor resources. In at least one prior art technique, the host software intercepts certain read and write commands from the guest software, such as those pertaining to servicing I/O interrupts, so that the same processor resources may be used to service interrupts to a number of different guest software programs, such as a number of operating systems.
For example, in at least one prior art virtualization technique, host software may intercept read or write commands issued by the guest software to processor resources that are “privileged” (i.e. resources that may not be accessed directly except by trusted software, such as operating systems).
FIG. 1 illustrates a prior art virtual machine architecture including three virtual machines being executed by the same processing hardware. Each virtual machine includes a host, such as a virtual machine monitor (VMM), through which guest software, such as an operating system, communicates with the processing hardware. End-user software applications may run on the operating system. Other prior art virtual machine architectures may include fewer or more virtual machines than those depicted in FIG. 1.
One problem with some prior art I/O resource virtualization techniques that operate in a virtualization architecture similar to FIG. 1, is that as the number of I/O interrupts increases, thereby increasing the number of read and write commands to the processing resources by the guest software, the host software (e.g., VMM) must intercept and service an increasing number of commands from the guest software. Host software servicing commands from the guest software prevents the guest software from performing other operations until the host software has serviced the commands, diminishing the performance of the guest software.
For example, FIG. 2 is a flow chart illustrating a prior art technique of servicing read commands issued by a guest software program to retrieve I/O interrupt information from the processor resources. In FIG. 2, the read command issued from the guest software is intercepted by a host VMM, because the read command is issued to a privileged resource of the processor (illustrated in FIG. 1). The VMM retrieves the I/O interrupt from the processing resource and returns the interrupt to the guest software, which can then service the interrupt. Once the guest software has serviced the I/O interrupt, the VMM returns control to the guest software at the next instruction following the point in program order where the guest was interrupted by the I/O interrupt.
Similarly, FIG. 3 is a flow diagram illustrating a prior art technique of servicing write commands issued by the guest software to assign interrupt priority in response to receiving an I/O interrupt. In FIG. 3, the write command issued from the guest software is intercepted by a host VMM, because the write command is issued to a privileged resource of the processor (illustrated in FIG. 1). Dissimilar from the read case illustrated in FIG. 2, the VMM writes the command to a guest representation of the I/O resource stored in memory. If there is already an interrupt being serviced (“pending”) by the guest (“guest interrupt”) and the pending guest interrupt does not allow other lower priority guest interrupts to be serviced until the pending guest interrupt has been serviced (i.e. the pending guest interrupt has “masked” lower priority guest interrupts), then the VMM returns control to the guest software at the next instruction where the guest was interrupted by the write command, such that guest software can resume operation after servicing the pending I/O interrupt.
Alternatively, if there is a pending guest interrupt being serviced at the time the write command is intercepted by the VMM and the pending guest interrupt allows other lower priority guest interrupts to be serviced before the pending guest interrupt is serviced (i.e. the pending guest interrupt has “unmasked” lower priority guest interrupts), then the VMM will deliver the guest I/O interrupt to the guest for servicing. Otherwise, if there is no pending guest interrupt at the time the VMM intercepts the write command from the guest, control is returned to the guest at the point at which the write command occurred and the guest resumes operation.
The VMM intercepts each of the read and write commands related to servicing I/O interrupts in the prior art I/O virtualization techniques illustrated in FIGS. 1 and 2, taking processing resources away from the guest software for periods of time. As the number of I/O interrupts increase either due to an increasing number of interrupt sources or an increasing number of interrupt targets (i.e. increasing number of guest software using the same processing resources), more processing resources are allocated to the VMM instead of the guest, thereby lowering performance of the guest. Prior art techniques have attempted to streamline the VMM, such that it will return control to the guest faster. However, there's a limit as to how much designers can optimize the VMM itself without reducing the necessary functionality of the VMM.
Performance in many modern computer systems is therefore at least partially dependent upon the performance of I/O resource virtualization techniques.